#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int main() {
    char name1[10] = "alice";
    char name2[10] = "bob";
    char name3[10] = "charlie";
    char name4[10] = "david";
    char name5[10] = "eve";

    char names[5][10];
    strcpy(names[0], name1);
    strcpy(names[1], name2);
    strcpy(names[2], name3);
    strcpy(names[3], name4);
    strcpy(names[4], name5);

    for (int i = 0; i < 4; i++) {
        for (int j = 0; j < 4 - i; j++) {
            if (strcmp(names[j], names[j + 1]) > 0) {
                char temp[10];
                strcpy(temp, names[j]);
                strcpy(names[j], names[j + 1]);
                strcpy(names[j + 1], temp);
            }
        }
    }

    for (int i = 0; i < 5; i++) {
        printf("%s ", names[i]);
    }

    return 0;
}
